/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.chl.chrfra.backing;

import edu.chl.chrfra.entities.Car;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.RequestScoped;

@ManagedBean
@RequestScoped
public class ViewProductsBackingBean {

    @ManagedProperty(value="#{persistenceUtilityBean}")
    PersistenceUtilityBean pBean;

    /** Creates a new instance of ViewCartBacking */
    public ViewProductsBackingBean() {
    }
    
    public Collection<Car> getProducts() {
        return pBean.getJpaCtrl().findEntities();
    }
    
    
    public PersistenceUtilityBean getpBean() {
        return pBean;
    }

    public void setpBean(PersistenceUtilityBean pBean) {
        this.pBean = pBean;
    }
    
    

}
